home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2005 November / WNnov2005.iso / Windows / Equipement / hMailServer / hMailServer-4.1-Build-136.exe / {app} / PHPWebAdmin / settings_ipranges_add.php < prev    next >
PHP Script  |  2005-01-06  |  3KB  |  65 lines

  1. <?php
  2. /*
  3. ** $Id: settings_ipranges_add.php,v 1.3 2005/01/05 22:22:50 hmailserver Exp $
  4. **
  5. **    hMailServer - Web interface
  6. **
  7. **    File formatted using TAB size 4
  8. **
  9. **    Get hMailserver at http://www.hmailserver.com
  10. **
  11. **    Author: Steen Rab°l <srabol@mail.tele.dk>
  12. **    Copyright (c) 2004, Steen Rab°l <srabol@mail.tele.dk>
  13. **
  14. **  This program is free software; you can redistribute it and/or modify
  15. **  it under the terms of the GNU General Public License as published by
  16. **  the Free Software Foundation; either version 2 of the License, or
  17. **  (at your option) any later version.
  18. **
  19. **  You may not change or alter any portion of this comment or credits
  20. **  of supporting developers from this source code or any supporting
  21. **  source code which is considered copyrighted (c) material of the
  22. **  original comment or credit authors.
  23. **
  24. **  This program is distributed in the hope that it will be useful,
  25. **  but WITHOUT ANY WARRANTY; without even the implied warranty of
  26. **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  27. **  GNU General Public License for more details.
  28. **
  29. **  You should have received a copy of the GNU General Public License
  30. **  along with this program; if not, write to the Free Software
  31. **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  32. **
  33. */
  34.  
  35. if (hmailGetAdminLevel() != 2)
  36.     hmailHackingAttemp();
  37.  
  38. $function            = hmailGetVar("function","");
  39. $obSettings            = $obBaseApp->Settings();
  40. $obSecurityRanges    = $obSettings->SecurityRanges();
  41.  
  42. if($function == "doadd")
  43. {
  44.     $obSecurityRange = $obSecurityRanges->Add();
  45.     $obSecurityRange->Name                                = hmailGetVar("Name");
  46.     $obSecurityRange->LowerIP                            = hmailGetVar("LowerIP");
  47.     $obSecurityRange->UpperIP                            = hmailGetVar("UpperIP");
  48.     $obSecurityRange->Priority                            = hmailGetVar("Priority");
  49.     $obSecurityRange->AllowSMTPConnections                = hmailGetVar("AllowSMTPConnections",0);
  50.     $obSecurityRange->RequireAuthForDeliveryToLocal        = hmailGetVar("RequireAuthForDeliveryToLocal",0);
  51.     $obSecurityRange->AllowPOP3Connections                = hmailGetVar("AllowPOP3Connections",0);
  52.     $obSecurityRange->RequireAuthForDeliveryToRemote    = hmailGetVar("RequireAuthForDeliveryToRemote",0);
  53.     $obSecurityRange->AllowIMAPConnections                = hmailGetVar("AllowIMAPConnections",0);
  54.     $obSecurityRange->AllowDeliveryFromLocalToLocal        = hmailGetVar("AllowDeliveryFromLocalToLocal",0);
  55.     $obSecurityRange->AllowDeliveryFromLocalToRemote    = hmailGetVar("AllowDeliveryFromLocalToRemote",0);
  56.     $obSecurityRange->AllowDeliveryFromRemoteToLocal    = hmailGetVar("AllowDeliveryFromRemoteToLocal",0);
  57.     $obSecurityRange->AllowDeliveryFromRemoteToRemote    = hmailGetVar("AllowDeliveryFromRemoteToRemote",0);
  58.     $obSecurityRange->Save();
  59.     header("refresh:0 url=index.php");
  60.     exit();
  61. }
  62.  
  63. $hmailSmarty->assign("settings", $obSettings);
  64. $hmailSmarty->assign("pagecontent", $hmailSmarty->fetch('settings_ipranges_add.tpl'));
  65. ?>